package cn.v2tila.rsosa.student.service.serviceImpl;

import cn.v2tila.rsosa.student.entity.CollegeEntity;
import cn.v2tila.rsosa.student.jpa.ClassJPA;
import cn.v2tila.rsosa.student.jpa.CollegeJPA;
import cn.v2tila.rsosa.student.service.CollegeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author v2tila on 16:32 2019/2/25
 */
@Service
public class CollegeServiceImpl implements CollegeService {
    @Autowired
    private CollegeJPA collegeJPA;
    public CollegeEntity findByNo(String no) {
        return collegeJPA.findByNo(no);
    }

    @Override
    public CollegeEntity findByNameAndSchoolNo(String name, String schoolNo) {
        return collegeJPA.findByNameAndSchoolNo(name,schoolNo);
    }

    @Override
    public CollegeEntity findBySchoolNoAndNo(String schoolNo, String No) {
        return collegeJPA.findBySchoolNoAndNo(schoolNo, No);
    }


    public List<CollegeEntity> findBySchoolNo(String schoolNo){
        return collegeJPA.findBySchoolNo(schoolNo);
    }

}
